﻿@{
    ViewData["Title"] = "创建新主题";
}


@section Head{
    <link rel="stylesheet" href="~/lib/dist/summernote/summernote.css" />
    
    <environment names="Development">
        <link rel="stylesheet" href="~/stylesheets/css/topic-create.css" />
    </environment>
    <environment names="QA,Integration,Staging,Production">
        <link rel="stylesheet" href="~/stylesheets/css/topic-create.min.css" asp-append-version="true" />
    </environment>
}


    <div class="row clearfix">
        <h3>创建新话题</h3>
        <div class="topic-title-container">
            <input id="new-topic-title" type="text" placeholder="标题" autofocus maxlength="120" />
        </div>
        <div class="topic-content-container">
            <div id="content-editor"></div>
        </div>
    </div>
    <div class="row topic-submit-section clearfix">
        <button id="submit-create" class="btn btn-default submit-create-btn">创建</button>
        <div id="topic-type-dropdown" class="dropdown topic-type-dropdown">
            <div class="dropdown-toggle topic-type-btn" data-toggle="dropdown" aria-haspopup="true">
                <span class="selected-type">话题类别</span>
                <span class="caret"></span>
            </div>
            <ul class="dropdown-menu">
                @foreach (var item in Html.GetEnumSelectList<TopicType>())
                {
                    <li class="topic-type-item"><a href="javascript:;" attr-value="@item.Value">@item.Text</a></li>
                }
            </ul>
        </div>
    </div>


@section Tail{
<environment names="Development">
    <script src="~/lib/dist/summernote/summernote.js"></script>
    <script src="~/lib/dist/turndown/turndown.js"></script>
</environment>
<environment names="QA,Integration,Staging,Production">
    <script src="~/lib/dist/summernote/summernote.min.js"></script>
    <script src="~/lib/dist/turndown/turndown.min.js"></script>
</environment>

<script>
    window.createTopicUrl = "@Url.Action("CreateTopic")";
</script>
<script src="~/scripts/markdown-editor.js"></script>
}